<?php
    namespace Home\Model;

    use Think\Model\RelationModel;

    class QuestionModel extends RelationModel
    {
        protected $_link = array(
            'answer'=>array(
                'mapping_type'=>self::HAS_MANY,
                'class_name'=>'answer',
                'mapping_fields'=>'filename,part',
                // 'mapping_fields'=>'part',
                ),
            );
    }